<template>
  <el-footer class="app-footer">
    <div class="footer-content">
      <div class="footer-left">
        <p class="copyright">© 2025 Company Name. All rights reserved.</p>
        <div class="links">
          <a href="#" class="footer-link">隐私政策</a>
          <a href="#" class="footer-link">使用条款</a>
          <a href="#" class="footer-link">Cookie政策</a>
        </div>
      </div>
      <div class="footer-center">
        <div class="contact-info">
          <p>联系我们：support@company.com</p>
          <p>电话：400-123-4567</p>
        </div>
      </div>
      <div class="footer-right">
        <div class="social-links">
          <a href="#" class="social-link"><i class="el-icon-social-weixin"></i></a>
          <a href="#" class="social-link"><i class="el-icon-social-weibo"></i></a>
          <a href="#" class="social-link"><i class="el-icon-social-github"></i></a>
          <a href="#" class="social-link"><i class="el-icon-social-twitter"></i></a>
        </div>
        <div class="version-info">
          <p>版本：v{{ version }}</p>
          <p>最后更新：{{ lastUpdated }}</p>
        </div>
      </div>
    </div>
  </el-footer>
</template>

<script>
export default {
  name: 'Footer',
  data() {
    return {
      version: '1.0.0',
      lastUpdated: '2025-08-28'
    }
  },
  mounted() {
    console.log('Footer component mounted')
  },
  methods: {
    // 可以在这里添加一些页脚相关的方法
    showContactModal() {
      this.$emit('show-contact')
    }
  }
}
</script>

<style scoped>
.app-footer {
  background-color: #f0f2f5;
  padding: 20px 0;
  border-top: 1px solid #e8e8e8;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-left,
.footer-center,
.footer-right {
  flex: 1;
}

.copyright {
  margin: 0 0 10px 0;
  color: #666;
  font-size: 14px;
}

.links {
  display: flex;
  gap: 20px;
}

.footer-link {
  color: #666;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-link:hover {
  color: #1890ff;
}

.contact-info p {
  margin: 5px 0;
  color: #666;
  font-size: 14px;
  text-align: center;
}

.social-links {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-bottom: 10px;
}

.social-link {
  color: #666;
  font-size: 20px;
  transition: color 0.3s;
}

.social-link:hover {
  color: #1890ff;
}

.version-info {
  text-align: right;
}

.version-info p {
  margin: 5px 0;
  color: #666;
  font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-left,
  .footer-center,
  .footer-right {
    margin-bottom: 20px;
  }
  
  .footer-right {
    margin-bottom: 0;
  }
  
  .links {
    justify-content: center;
  }
  
  .social-links,
  .version-info {
    justify-content: center;
    text-align: center;
  }
}
</style>